package com.ctg.auth.dao;

import com.ctg.auth.bean.Permisssion;
import com.ctg.auth.bean.User;
import com.ctg.auth.bean.UserExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UserMapper {
    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    
    /**
     * 根据用户名查询用户的id
     * @param map
     * @return
     */
	int getUid(Map<String, Object> map);
	
	/**
	 * 根据用户id查询用户的操作权限
	 * @param map
	 * @return
	 */
	List<Permisssion> getUserAuth(Map<String, Object> map);
}